﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Card Charging</title>
     <script src="<%= Url.Content("~/Scripts/MicrosoftAjax.debug.js") %>" type="text/javascript"></script>  
    <script src="<%= Url.Content("~/Scripts/MicrosoftMvcAjax.debug.js") %>" type="text/javascript"></script>   
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
    <script src="/Scripts/vgo_01.js"></script>
    <link rel="Stylesheet" href="/Content/Style/layoutAll.css" />
</head>
<body>
    <div>
          <center>  
           Xin Chào: 
           <span style="color:Blue">
                    <% if (Session["UserName"] != null)
                       {%>
                        <%: Session["UserName"].ToString()%>
                    <%}
                       else Response.Redirect("/User/Login"); %>
          </span>
           <%: Html.ActionLink("thoát","Logout", "User") %><br />
           <br />
          <div id="div_gameIDErr" class="div_err"><span id="lbGameIDErrMsg" class="ErrMsg"></span><br /></div>
          <div id="div_cardTypeErr" class="div_err"><span id="lbCardTypeErrMsg" class="ErrMsg"></span><br /></div>
          <div id="div_cardNoErr" class="div_err"><span id="lbCardNoErrMsg" class="ErrMsg"></span><br /></div>
          <div id="div_SeriNoErr" class="div_err"><span id="lbSeriNoErrMsg" class="ErrMsg"></span><br /></div>
          <div id="div_captchaErr" class="div_err"><span id="lbCaptchaErrMsg" class="ErrMsg"></span></div>
            <form onsubmit="return ValidCardValues()" method ="post" action="/CardBill/Charging" >
            <table>
                <tr>
                    <td>Chọn game: </td>
                    <td>
                         <% if (ViewData["GameID"] != null)
                           { %>
                           <%: Html.DropDownList("GameID", "--Chọn game--")%>
                        <%} %>
                        <img src="" id="img_gameIDMsg" class="img_alert"/>
                    </td>
                </tr>
                <tr>
                    <td>Loại thẻ:</td>
                    <td>
                          <% if (ViewData["SupplierLst"] != null)
                           { %>
                           <%: Html.DropDownList("SupplierLst", "--Chọn loại thẻ--")%>
                        <%} %>
                        <img src="" id="img_nhaCC" class="img_alert"/>
                    </td>
                </tr>   
                <tr>
                    <td>Mã số Thẻ:</td>
                    <td><input type="text" id="txt_mathe" name="cardNumber" /></td>
                     <td><img src="" id="img_mathe" class="img_alert"/></td>
                </tr>
                <tr>
                    <td>Số seri:</td>
                    <td><input type="text" id="txt_soseri" name="seriNumber" /></td>
                    <td><img src="" id="img_soseri" class="img_alert"/></td>
                </tr>
                <tr>
                    <td></td>
                   <td valign="middle">  
                    <% if (ViewData["ImageUrl"] != null)
                        { %>
                           <% string imageUrl = ViewData["ImageUrl"].ToString(); %>
                           <input type="hidden" id="imageChangeUrl" name="imgSrc" />
                           <img src="<%: imageUrl %>" id="img_captCha" />
                      <%} %>
                      <%: Ajax.ActionLink(" ", "CreateCaptcha", new { id = "ReloadCaptcha" }, new AjaxOptions { UpdateTargetId = "imageChangeUrl", OnSuccess = "AjaxComplete" }, new { @Class = "refesh" })%>
                </td>
                <td>&nbsp;</td>
                </tr>
                <tr>
                    <td>Mã bảo mật:</td>
                    <td>
                        <input type="text" id="txt_captcha" name="strCaptCha" maxlength="5" title="Vui lòng nhập mã hình ảnh bên trên" />
                      <%--  <input type="button" value="check" id="validCaptcha" />--%>
                        <span class="errorMsg" id="captchaMsg" ></span>
                   </td>
                   <td><img src="" id="img_captchaMsg" class="img_alert"/></td>
                </tr>
                 <tr>
                    <td>&nbsp;</td>
                    <td>
                        <input type="submit" id="btn_napthe" name="btn_napthe" value="Nạp tiền" />
                   </td>
                   <td>&nbsp;</td>
                </tr>
            </table>
            </form>
            <% if (ViewData["GiaoDichLoi"] != null)
               { %>
                <%: ViewData["GiaoDichLoi"].ToString()%>
            <%} %>
            <br />
            <span id="lb_ErrNort" class="ErrMsg"></span><br />
       </center>
    </div>
</body>
</html>
